#![allow(dead_code)]

struct DebugLrn {}

impl DebugLrn {
    pub fn hello() {
        println!("DebugLrn Leranning");
    }
}

#[cfg(test)]
mod tests {
    // use super::*;

    #[test]
    fn impl_debug() {
        struct MyType {
            x: i32,
            y: i32,
            z: i32,
        }

        impl std::fmt::Debug for MyType {
            fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
                f.debug_struct("MyType")
                    .field("custom x", &self.x)
                    .field("custom y", &self.y)
                    .field("custom z", &self.z)
                    .finish()
            }
        }

        let my_type = MyType { x: 1, y: 2, z: 3 };
        println!("{:?}", my_type);
    }
}
